<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title>文档类型详情</title>
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="refresh" content="1200">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link href="/dist/plugins/umeditor1.2.3-src/themes/default/_css/umeditor.css" rel="stylesheet" />
    <link rel="stylesheet" href="/dist/plugins/webuploader-0.1.5/webuploader.css">
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">
    <!--<link rel="stylesheet" href="/statics/css/email/send.css?t=1">-->
    <style>
        .table-my-box{
            padding:10px 15px;
            background: #f7f8fa;
        }
        .table-my{
            width: 100%;
        }
        .table-my .title{
            width: 60px;
            height: 34px;
            line-height: 34px;
            text-align: left;
        }
        .table-my .value{
            padding: 5px 0;
        }
        .webuploader-container {
            position: relative;
            margin-top: 15px;
        }
        #divUploadedFiles{
            padding: 20px 10px;
            border:1px dashed  #ddd;
            width:50%;
        }
        .webuploader-container {
            position: relative;
            /* margin-top: 15px; */
            height: 32px;
            margin-top: -9px;
        }
        .divUploadedFiles{
            width: 480px;
            float:left;
        }
        .divUploadedFiles .progressobj {
            float: left;
            width: 300px;
            margin-top: 2px;
        }
        .delfile{
            cursor: pointer;
            margin-left: 5px;
        }
    </style>
</head>
<body style="background-color:#fff">
<section class="content"  id="app" >
    <div class="box-body no-padding  iframeH" style="overflow: auto;background: #fff;">
        <div class="box-body">
            <div class="table-my-box">
                <table cellspacing="0" class="table-my">
                    <tbody>
                    <tr>
                        <td class="title" >
                            文档名称
                        </td>
                        <td class="value">
                            <input type="text" class="form-control"  v-model="list.name" >
                        </td>
                    </tr>
                    <tr>
                        <td class="title" >
                            文档URL
                        </td>
                        <td class="value">
                            <input type="text" class="form-control"  v-model="list.url" >
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="form-group text-center">
            <input type="button"  @click="createFile" class="btn oaBtn " value="保存" style="margin-top: 20px;"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button"  @click="cancleFile" class="btn oaBtn " value="取消" style="margin-top: 20px;"/>
            <div class="clearfix"></div>
        </div>
    </div>


</section>

<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="/dist/js/pages/editor_api.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script src="/dist/plugins/umeditor1.2.3-src/third-party/template.min.js"></script>
<script src="/dist/plugins/umeditor1.2.3-src/umeditor.config.js"></script>
<script src="/dist/plugins/umeditor1.2.3-src/lang/zh-cn/zh-cn.js"></script>
<script src="/dist/plugins/webuploader-0.1.5/webuploader.min.js"></script>
<script src="/dist/plugins/select2/select2.full.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<!--oa自定义  JS-->
<script>
    var api = frameElement.api, W = api.opener;
    var app = new Vue({
        el: '#app',
        data: {
            id:$.wyui.page.urlParams.id,
            url:'',
            list:{
                  name:'',
                  url:'',
                  delFlag:0
            }
        },
        methods: {
            /*点击取消*/
            cancleFile:function(){
                alert("是否取消编辑关闭本页面");
                api.close();
            },
            /*点击保存*/
            createFile: function () {
                var that = this;
                if (this.list.name == "") {
                    alert("请输入类型名称！");
                    return;
                };
                if (this.list.url == "") {
                    alert("请选择类型URL！");
                    return;
                };
                $.wyui.postMethod('/docType/save.json',that.list,function () {
                    alert("保存成功！");
                    //刷新页面
                    parent.app.sel();
                    //关闭页面
                    api.close();
                })
            }
        },
        mounted: function () {
            var that = this;
            if(that.id){
                $.wyui.postMethod('/docType/getTypeById.json', {id:that.id}, function (data) {
                    that.list = data;
                    console.log(that.list)
                });
            }
        }
    });
</script>

</body>
</html>